<template>
  <view class="desc-card">
    <view class="p-con">
      <view class="p-con-item">
        <text class="p-con-label">现居</text>
        <text>{{info.at_province}} {{info.at_city}}</text>
      </view>
      <view class="p-con-item">
        <text class="p-con-label">身高</text>
        <text>{{info.height}}cm</text>
      </view>
      <view class="p-con-item">
        <text class="p-con-label">学历</text>
        <text>{{info.edu}}</text>
      </view>
      <view class="p-con-item">
        <text class="p-con-label">收入</text>
        <text>{{info.income}}</text>
      </view>
    </view>
    <view class="p-desc" v-if="!from">{{info.smalltext}}</view>
  </view>
</template>

<script setup>
const props = defineProps({
  info: {
    type: Object,
    default: () => ({}),
  },
  from: {
    type: String,
    default: "",
  },
});
</script>

<style lang=scss scoped>
.p-con {
  display: flex;
  flex-wrap: wrap;
  padding: 20rpx 0;
  font-size: 36rpx;
  font-weight: bold;
  color: $uni-text-color;
  .p-con-label {
    color: $uni-text-color-grey;
    margin-right: 20rpx;
  }
  .p-con-item {
    margin-bottom: 10rpx;
  }
  .p-con-item:nth-child(1),
  .p-con-item:nth-child(3) {
    width: 45%;
  }
}
.p-desc {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* 设置最大显示行数 */
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
  color: $uni-text-color;
  font-weight: bold;
  font-size: 36rpx;
}
</style>